﻿using Jst.Application.Contracts.IApplication.DbFirst;
using Jst.Core.jwt;
using Microsoft.AspNetCore.Mvc;
using System.ComponentModel;

namespace Jst.EntityFrameworkCore.Controllers.DbFirst
{
    [Route("api/[controller]/[action]")]
    [ApiController] 
    public class DbFirstController : BaseApiController
    {
        private readonly IDbFirstServices _dbFirstServices;

        public DbFirstController(IDbFirstServices dbFirstServices)
        {
            _dbFirstServices = dbFirstServices;
        }


        /// <summary>
        /// 实体类生成
        /// </summary>
        /// <param name="AClassName"></param>
        /// <returns></returns>
        [Description("实体类生成")]
        [HttpGet]
        public async Task<ApiResult> InsertDbFirstAsync([FromQuery] string className)
        => await _dbFirstServices.DbFirstAsync(className);
    }
}
